if(!window.anthill) anthill={};
if(!anthill.websockets) anthill.websockets = {};

anthill.websockets.Manager = function() {
  this.set('socket', io.connect(anthill.ws_url+'/browser'));
  var mng = this;
  this.get('socket').on('createMobile', function(id) {
    google.maps.event.trigger(mng, 'createMarker', id);
  });
};

anthill.websockets.Manager.prototype = new google.maps.MVCObject();

anthill.websockets.Manager.prototype.setMap = function(map) {
  this.set('map', map);
};

anthill.websockets.Manager.prototype.getMap = function() {
  return this.get('map');
};